//
//  WMEFirstPageModel.m
//  everyDay_duiTang
//
//  Created by 恩叔 on 16/1/16.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMEFirstPageModel.h"

@implementation WMEFirstPageModel

- (void)dealloc
{
    [super dealloc];
    [_msg release];/**<文本*/
    
    [_ID release];/**<cell对应的id*/
    [_path release];/**<图片*/
    [_height release];/**<高度*/
    [_width release];/**<宽度*/
    [_avatar release];/**<头像*/
    [_senderId release];/**<用户id*/
    [_username release];/**<用户名*/
    [_albumId release];/**<文本名字对应的id*/
    [_name release];/**<文本名字*/
    [_like_count release];/**<赞*/
    [_favorite_count release];/**<收藏*/
    [_reply_count release];/**<评论*/
    [_add_datetime_pretty release];/**<发布多久了*/
    [_recipientName release];
    [_recipientId release];
    [_target release];
    
    [_descriptions release];
    [_enabled_at_str release];//活动开始的时间
    [_disabled_at_str release];//活动失效的时间
    [_image_url release];//图片的URL

}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"photo"]) {
        self.path = value[@"path"];
        self.width = value[@"width"];
        self.height = value[@"height"];
    }
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }
    if ([key isEqualToString:@"sender"]) {
        self.avatar = value[@"avatar"];
        self.senderId = value[@"id"];
        self.username = value[@"username"];
    }
    if ([key isEqualToString:@"album"]) {
        self.albumId = value[@"id"];
        self.name = value[@"name"];
        self.albumCount = value[@"count"];
    }
    if ([key isEqualToString:@"actor"]) {
        self.supportName = value[@"username"];
        self.supportId = value[@"id"];
        self.supportAvatar = value[@"avatar"];
    }
    
    if ([key isEqualToString:@"recipient"]) {
        self.recipientName = value[@"username"];
        self.recipientId = value[@"id"];
    }
    
    if ([key isEqualToString:@"description"]) {
        self.descriptions = value;
    }
}

@end
